import {Link,hashHistory} from "react-router";


export default React.createClass({
	getInitialState : function(){
		return {
			init :{
				background :"#eee",
				position: "fixed", 
				top:0,
				left:0,
				width:"100%",
				zIndex:20
			}
		}
	},
	isX : true,
    xian : function(){
    	var obj = document.getElementsByClassName("goods_flex_div")[0]
    	var obj2 =document.getElementById("sanjiao")
    	if(this.isX){
    		obj.style.display = "block"
    		obj2.style.display = "block"
    		this.isX = !this.isX
    	}else{
    		obj.style.display = "none"
    		obj2.style.display = "none"
    		this.isX = !this.isX
    	}
    },
    fan:function(){
		hashHistory.goBack()
	},
	render: function(){
		return(
			<footer style={this.state.init}>
			 	<div className="ss_header_div" > 
				 <Link onClick={this.fan} className="iconfont home_fs_btn icon-fanhui"></Link>
					 <div id="list_div_der">
						<a href="javascript:;" className = "iconfont fdl_btn icon-home_sousuo"></a>
						<input type="text" defaultValue="大益"  ref="name"/>
					</div>
					<Link to="fenlei" className="iconfont list_fs_btn icon-fenlei" id="list_fs_btn"></Link>
					<a className="iconfont list_fs_btn icon-home_gengduo" id="list_fs_btn" onClick={this.xian}></a> 
				 </div>
				 <ul className="goods_flex_div">
		 			<Link to="home">
		 			<i className="iconfont goods_flex_div_btn icon-shouye"></i>
		 			<span>首页</span>
		 			</Link>
		 			<Link to="home/sousuo">
		 			<i className="iconfont goods_flex_div_btn icon-home_sousuo" ></i>
		 			<span>搜索</span>
		 			</Link>
		 			<Link to="car">
		 			<i className="iconfont goods_flex_div_btn icon-gouwuche1"></i>
		 			<span>购物车</span>
		 			</Link>
		 			<Link to="isme">
		 			<i className="iconfont goods_flex_div_btn icon-wode"></i>
		 			<span>我的</span>
		 			</Link>
		 			<Link >
		 			<i className="iconfont goods_flex_div_btn icon-kefu"></i>
		 			<span>消息</span>
		 			</Link>
		 		</ul>
		 			<div id="sanjiao"></div>
			 </footer>
		)
	}
})
